﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HA.Data
{
    /// <summary>
    /// 位图集合改变事件
    /// </summary>
    public class BitImageCollectionChangedEventArgs:EventArgs
    {
        /// <summary>
        /// 删除图像的构造函数
        /// </summary>
        public BitImageCollectionChangedEventArgs(List<string> deleteIds)
        {
            this._type = CollectionChangedType.REMOVE;
            this._deleteImageIds = deleteIds;
        }

        /// <summary>
        /// 添加图像的构造函数
        /// </summary>
        public BitImageCollectionChangedEventArgs(Dictionary<string, BitImageInfoes> idAndInfoes)
        {
            this._type = CollectionChangedType.ADD;
            this._imageIdAndInfoes = idAndInfoes;
        }

        //public BitImageCollectionChangedEventArgs()
        //{
        //    
        //}

        CollectionChangedType _type;
        /// <summary>
        /// 更改事件类型
        /// </summary>
        public CollectionChangedType Type
        {
            get { return _type; }
            set { _type = value; }
        }

        List<string> _deleteImageIds;
        /// <summary>
        /// 要删除图片的Id集合
        /// </summary>
        public List<string> DeleteImageIds
        {
            get { return _deleteImageIds; }
            set { _deleteImageIds = value; }
        }

        Dictionary<string, BitImageInfoes> _imageIdAndInfoes;
        /// <summary>
        /// 要添加的图片的id跟信息
        /// </summary>
        public Dictionary<string, BitImageInfoes> ImageIdAndInfoes
        {
            get { return _imageIdAndInfoes; }
            set { _imageIdAndInfoes = value; }
        }


    }
}
